home *** CD-ROM | disk | FTP | other *** search
- head 1.4;
- branch ;
- access ;
- symbols ;
- locks mendel:1.4; strict;
- comment @ * @;
-
-
- 1.4
- date 87.05.12.12.45.24; author brent; state Exp;
- branches ;
- next 1.3;
-
- 1.3
- date 87.05.11.11.32.13; author brent; state Exp;
- branches ;
- next 1.2;
-
- 1.2
- date 87.05.08.17.46.52; author brent; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 87.05.08.12.06.18; author brent; state Exp;
- branches ;
- next ;
-
-
- desc
- @Boot version of fsOpTable.h - Switch tables for IO routines.
- @
-
-
- 1.4
- log
- @Working version for scsi disk and tape
- @
- text
- @/*
- * fsOpTable.h --
- *
- * Boot program operation switches
- *
- * Copyright 1986 Regents of the University of California
- * All rights reserved.
- *
- *
- * $Header: fsOpTable.h,v 1.3 87/05/11 11:32:13 brent Exp $ SPRITE (Berkeley)
- */
-
- #ifndef _FSOPTABLE
- #define _FSOPTABLE
-
- /*
- * Raw, (ie. no understanding of an underlying filesystem block structure)
- * device operations.
- */
-
- typedef struct FsRawDeviceOps {
- int type; /* One of the device types. */
- ReturnStatus (*readWrite)();
- } FsRawDeviceOps;
-
- extern FsRawDeviceOps fsRawDeviceOpsTable[];
-
- /*
- * FsRawDeviceRead --
- * Byte interface to read raw devices.
- */
- #define FsRawDeviceRead(devicePtr, offset, numBytes, buf, lenPtr) \
- (*fsRawDeviceOpsTable[(devicePtr)->type].readWrite) \
- (FS_READ, devicePtr, offset, numBytes, buf, lenPtr)
- #ifdef comment
- Fs_Device *devicePtr; /* Device to to I/O to */
- int offset; /* Byte offset of I/O operation */
- int numBytes; /* Byte count */
- Address buf; /* I/O buffer */
- int *lenPtr; /* Amount actually transfered */
- #endif comment
- /*
- * FsRawDeviceWrite --
- * Byte interface to write raw devices.
- */
- #define FsRawDeviceWrite(devicePtr, offset, numBytes, buf, lenPtr) \
- (*fsRawDeviceOpsTable[(devicePtr)->type].readWrite) \
- (FS_WRITE, devicePtr, offset, numBytes, buf, lenPtr)
- #ifdef comment
- Fs_Device *devicePtr; /* Device to to I/O to */
- int offset; /* Byte offset of I/O operation */
- int numBytes; /* Byte count */
- Address buf; /* I/O buffer */
- int *lenPtr; /* Amount actually transfered */
- #endif comment
-
-
-
- /*
- * The filesystem block I/O operation switch.
- */
- typedef struct FsBlockOps {
- int deviceType; /* Redundant device type info */
- ReturnStatus (*init)(); /* Initialization procedure */
- ReturnStatus (*readWrite)(); /* Block read/write routine */
- } FsBlockOps;
-
- extern FsBlockOps fsBlockOpsTable[];
-
- /*
- * FsBlockIO --
- * A device specific Block I/O routine is used to read or write
- * filesystem blocks on a disk. Its maps from filesystem
- * block indexes to disk addresses and does the I/O.
- */
- #define FsBlockIO(readWriteFlag, devicePtr, blockNumber, numBlocks, buf) \
- (*fsBlockOpsTable[(devicePtr)->type].readWrite) \
- (readWriteFlag, devicePtr, blockNumber, numBlocks, buf)
- #ifdef comment
- int readWriteFlag; /* FS_READ or FS_WRITE */
- Fs_Device *devicePtr; /* Device to to I/O to */
- int blockNumber; /* CAREFUL, fragment index, not block index */
- int numBlocks; /* CAREFUL, number of fragments, not blocks */
- Address buf; /* I/O buffer */
- #endif comment
-
- /*
- * Known device types. These need to start at zero as they are used
- * to index into I/O switch tables.
- */
-
- #define FS_DEV_SCSI_DISK 0
- #define FS_DEV_SCSI_TAPE 1
- #define FS_DEV_XYLOGICS 2
-
- /*
- * Forward Declarations.
- */
-
- ReturnStatus NullProc();
- ReturnStatus FsNoProc();
- ReturnStatus FsNoDevice();
-
- #endif _FSOPTABLE
- @
-
-
- 1.3
- log
- @Version for all devices
- @
- text
- @d10 1
- a10 1
- * $Header: fsOpTable.h,v 1.2 87/05/08 17:46:52 brent Exp $ SPRITE (Berkeley)
- d34 1
- a34 1
- (FS_READ, devicePtr->unit, offset, numBytes, buf, lenPtr)
- @
-
-
- 1.2
- log
- @Added stuff for Xylogics, fixed the RawDeviceOpsTable
- @
- text
- @d10 1
- a10 1
- * $Header: fsOpTable.h,v 1.1 87/05/08 12:06:18 brent Exp $ SPRITE (Berkeley)
- a15 1
-
- a16 28
- * The filesystem block I/O operation switch.
- */
- typedef struct FsBlockOps {
- int deviceType; /* Redundant device type info */
- ReturnStatus (*init)(); /* Initialization procedure */
- ReturnStatus (*readWrite)(); /* Block read/write routine */
- } FsBlockOps;
-
- extern FsBlockOps fsBlockOpsTable[];
-
- /*
- * FsBlockIO --
- * A device specific Block I/O routine is used to read or write
- * filesystem blocks on a disk. Its maps from filesystem
- * block indexes to disk addresses and does the I/O.
- */
- #define FsBlockIO(readWriteFlag, devicePtr, blockNumber, numBlocks, buf) \
- (*fsBlockOpsTable[(devicePtr)->type].readWrite) \
- (readWriteFlag, devicePtr, blockNumber, numBlocks, buf)
- #ifdef comment
- int readWriteFlag; /* FS_READ or FS_WRITE */
- Fs_Device *devicePtr; /* Device to to I/O to */
- int blockNumber; /* CAREFUL, fragment index, not block index */
- int numBlocks; /* CAREFUL, number of fragments, not blocks */
- Address buf; /* I/O buffer */
- #endif comment
-
- /*
- d33 2
- a34 2
- (*fsRawDeviceOpsTable[(devicePtr)->type].read) \
- (devicePtr, offset, numBytes, buf, lenPtr)
- d47 2
- a48 2
- (*fsRawDeviceOpsTable[(devicePtr)->type].write) \
- (devicePtr, offset, numBytes, buf, lenPtr)
- d55 30
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d10 1
- a10 1
- * $Header: fsOpTable.h,v 1.20 86/07/15 12:05:19 brent Exp $ SPRITE (Berkeley)
- d52 1
- a52 2
- ReturnStatus (*read)();
- ReturnStatus (*write)();
- d87 2
- a88 1
- * Known device types.
- d93 1
- @
-